The translate coordinates are calculated as the offset after the scale, so it
needs to be applied after the scale as well. This fixes random centering issues
in the UI.
https://bugzilla.gnome.org/show_bug.cgi?id=660674
x_offset = - (node->alloc_width / 2. - scaled_width / 2.);
}
- cairo_matrix_init_translate (&matrix, x_offset, y_offset);
- cairo_matrix_scale (&matrix, scale_factor, scale_factor);
+ cairo_matrix_init_scale (&matrix, scale_factor, scale_factor);
+ cairo_matrix_translate (&matrix, x_offset, y_offset);
cairo_pattern_set_matrix (pattern, &matrix);